#include <stdio.h>

struct BaseParams
{
        //基本参数
        //轴距
        // double a1 = 3450, a2 = 3450;
        double a1, a2;
        //前后轴距
        // double b1 = 1660, b2 = 1790;
        double b1, b2;
        //轮距
        // double c1 = 2150,c2 = 2150;
        double c1,c2;
        //胎宽
        // double d1 = 600, d2 = 600;
        double d1, d2;
        //前轴到铲外侧距离,斗宽
        // double e = 3000, f= 2976;
        double e, f;
        //前摄像头与车架距离,用于确定原点位置,原点在前摄像头的地面投影点
        // double g = 510;
        double g;
        // 后车轮末端距摄像头水平距离
        // double rw2c = 3424;
        double rw2c;
        // 后车架末端距摄像头水平距离
        // double rf2c = 5053;
        double rf2c;
};

struct CameraParams
{
        //摄像头安装位置/0-前;1-后
        int location;
        //摄像头到中心转动轴的距离,摄像头高度,摄像头左右偏移量,摄像头前后偏移量
        double high, left, forward;
        // double high = 3650, left = 0, forward = 0;
        //摄像头显示参数
        //7M、5M、3M、1M、0M线位置
        double guideline7, guideline5, guideline3, guideline1, guideline0;
        // double guideline7 = 7000, guideline5 = 5000, guideline3 = 3000, guideline1 = 1000, guideline0 = 500;
        // double mw = 6000, hw = 600 ;
        double mw, hw ;
        //摄像头成像像素尺寸
        double width, height;
        // double width = 1920, height = 1080;
        
        //相机参数
        //摄像头x轴旋转角度,摄像头z轴旋转角度,摄像头y轴旋转角度
        double xAngle, zAngle, yAngle;
        // double xAngle = 9.865f, zAngle = 0, yAngle = -90;
        
        //前摄像头0度时画直线的四个点
        double zeroPointX0;
        double zeroPointY0;
        double zeroPointX1;
        double zeroPointY1;
        double zeroPointX2;
        double zeroPointY2;
        double zeroPointX3;
        double zeroPointY3;
        // double zeroPointX0 = 898;
        // double zeroPointY0 = 604;
        // double zeroPointX1 = 748;
        // double zeroPointY1 = 1000;
        // double zeroPointX2 = 1030;
        // double zeroPointY2 = 604;
        // double zeroPointX3 = 1210;
        // double zeroPointY3 = 1000;
        //直行4条横线的Y值
        double guideline0PointY;
        double guideline1PointY;
        double guideline3PointY;
        double guideline5PointY;
        double guideline7PointY;

        //角度阈值,小于这个角度时取0度
        double angleThreshold;
        //进行镜像的对称轴位置
        double axisX;
        // double axisX = 960 + 14;

        //对称轴偏移量,因摄像头有左右转角,使用对称方式画正负角度需要将对称轴做不同偏移
        double axisXOffsetX0, axisXOffsetX1;
        //转角时大于多少度显示实线
        double showAngle;
        // double showAngle = 20;

        // 摄像头内参
        double IntrinsicParameters0;
        double IntrinsicParameters1;
        double IntrinsicParameters2;
        double IntrinsicParameters3;
        double IntrinsicParameters4;
        double IntrinsicParameters5;
};

struct ScreenParams
{
        //是否显示7M线
        int ISSHOW7MLine;
        //是否显示5M线
        int ISSHOW5MLine;
        //是否显示3M线
        int ISSHOW3MLine;
        //是否显示1M线
        int ISSHOW1MLine;
        //是否显示0M线
        int ISSHOW0MLine;

        //屏幕参数-中间
        //整体图片偏移,以左边为原点,如9宫格中间显示则需要偏移1/3分辨率,即offsetX=640
        double offsetX, offsetY, offsetScale;
        // double offsetX=640, offsetY = 360, offsetScale = 3;
        double viewMinY, viewMaxY;
        // double viewMinY = 360, viewMaxY = 720;
        double viewMinX, viewMaxX;
        // double viewMinX = 640, viewMaxX = 1280;
        //屏幕参数-左上角2 倍
        // double offsetX = 0, offsetY = 0, offsetScale = 1.5;
        // double viewMinY = 0, viewMaxY = 720;
        // double viewMinX = 0, viewMaxX = 1280;
};

struct DistortionParams
{
        //畸变参数
        int isDistortion;   //是否计算畸变
        double k1;
        double k2;
        double k3;
        double p1;
        double p2;
        double s1;
        double s2;
};

//测试参数
struct TestParams
{
        //是否显示轨迹线(包括距离显示)
        int testIsShowTrackline; 
        //测试旋转角度
        double testAngle;
};

struct BaseParams baseParams;

struct CameraParams cameraParams0, cameraParams1;

struct ScreenParams screenParams0, screenParams1;

struct DistortionParams distortionParams;

struct TestParams testParams;